﻿using System;
using System.IO;
using viForum.Controllers;
using visinia.SmartEngine;

public partial class Admin_Pages_viForum_Settings_Settings : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string path = Server.MapPath(WebRoots.GetModulesRoot + "viForum/Themes");
        string[] dirs = Directory.GetFileSystemEntries(path);
        foreach (string dir in dirs)
        {
            if (File.Exists(dir + "/viForum.css"))
                THEMES.Items.Add(Path.GetFileName(dir));
        }
        THEMES.SelectedValue = BaseController.ForumTheme;
    }

    public void Save()
    {
        BaseController.ForumTheme = THEMES.SelectedValue;
    }
}
